package cn.com.cdfg.cdfmemberapitest.testcase;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;
import org.junit.Test;

import com.ymt.base.YmatouEasyCall;
import com.ymt.core.tool.FormatUtil;

import cn.com.cdfg.cdfmemberapitest.parameter.DistBean;

public class QhmcouponTest {
	/**
	 * @throws IOException 
	 * @throws ClientProtocolException 
	 * 
	 */
	@Test
	public void Test1() throws ClientProtocolException, IOException {
		DistBean DistBean=new DistBean();
		DistBean.setCouTypeCode("40BLD001032");
		DistBean.setPhone("18121108530");
		YmatouEasyCall ec = new YmatouEasyCall("https://cdfmemberapitest.cdfg.com.cn:20013/qhmcoupon/dist", "POST", "STRING");
		String send="token=21A5EAF6588E453CBF2410372605747B&jsonData="+FormatUtil.urlEncode(FormatUtil.beanToGSONString(DistBean));
		ec.removeHeader("Content-Type");
		ec.addHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
		ec.setData(send);
		ec.callService();
	}
}
